package object4.package5;

public class Duck extends Animal implements ISwimming,IRunning,IFlying{

    public Duck(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println(getName() + "用翅膀飞");
    }

    @Override
    public void run() {
        System.out.println(getName() + "用两条腿跑");
    }

    @Override
    public void swim() {
        System.out.println(getName() + "浮在水面上游泳");
    }
}
